$(function(){
		/*点击搜索条件*/
		/*包含区域*/
		$(".difang").click(function(){
			$(this).parent().parent().css("display","none");
			$("#yixuanze").css("display","block");
			$("#xuanze_difang").css("display","block");
			var tiaojian=$(this).text();
			$(".xuanze_difang").html("&nbsp;"+tiaojian+"&nbsp;x&nbsp;");
		})
		/*行程天数*/
		$(".xingcheng").click(function(){
			$(this).parent().parent().css("display","none");
			$("#yixuanze").css("display","block");
			$("#xuanze_xingcheng").css("display","block");
			var tiaojian=$(this).text();
			$(".xuanze_xingcheng").html("&nbsp;"+tiaojian+"&nbsp;x&nbsp;");
		})
		$(".xingcheng_5").click(function(){
			$(this).parent().parent().css("display","none");
			$("#yixuanze").css("display","block");
			$("#xuanze_xingcheng").css("display","block");
			var tiaojian=$(this).text();
			$(".xuanze_xingcheng").html("&nbsp;"+tiaojian+"&nbsp;x&nbsp;");
		})
		/*出发日期*/
		$(".chufa").click(function(){
			$(this).parent().parent().css("display","none");
			$("#yixuanze").css("display","block");
			$("#xuanze_chufa").css("display","block");
			var tiaojian=$(this).text();
			$(".xuanze_chufa").html("&nbsp;"+tiaojian+"&nbsp;x&nbsp;");
		})
		/*价格区间*/
		$(".jiage").click(function(){
			$(this).parent().parent().css("display","none");
			$("#yixuanze").css("display","block");
			$("#xuanze_jiage").css("display","block");
			var tiaojian=$(this).text();
			$(".xuanze_jiage").html("&nbsp;"+tiaojian+"&nbsp;x&nbsp;");
		})
		/*点击多选栏确定按钮*/
		/*包含区域*/
		$("[name='difang']").click(function(){
			$(".buxian_difang").attr("checked",null);
		})
		$(".difang_but").click(function(){
			var str="";
			$("#difang_2 input:checked").each(function(){
				str=str+$(this).val()+",";
			})
			str=str.substr(0,str.length-1);
			$("#difang_2").css("display","none");
			$("[name='difang']").attr("checked",null);
			$(".buxian_difang").attr("checked","checked");
			if(str!="on"&&str!=""){
				$("#yixuanze").css("display","block");
				$("#xuanze_difang").css("display","block");
				$(".xuanze_difang").html("&nbsp;"+str+"&nbsp;x&nbsp;");
			}else{
				$("#difang").css("display","block");
			}
		})
		/*行程天数*/
		$("[name='xingcheng']").click(function(){
			$(".buxian_xingcheng").attr("checked",null);
		})
		$(".xingcheng_but").click(function(){
			var str="";
			$("#xingcheng_2 input:checked").each(function(){
				str=str+$(this).val()+",";
			})
			str=str.substr(0,str.length-1);
			$("#xingcheng_2").css("display","none");
			$("[name='xingcheng']").attr("checked",null);
			$(".buxian_xingcheng").attr("checked","checked");
			if(str!="on"&&str!=""){
				$("#yixuanze").css("display","block");
				$("#xuanze_xingcheng").css("display","block");
				$(".xuanze_xingcheng").html("&nbsp;"+str+"&nbsp;x&nbsp;");
			}else{
				$("#xingcheng").css("display","block");
			}
		})
		/*出发日期*/
		$("[name='chufa']").click(function(){
			$(".buxian_chufa").attr("checked",null);
		})
		$(".chufa_but").click(function(){
			var str="";
			$("#chufa_2 input:checked").each(function(){
				str=str+$(this).val()+",";
			})
			str=str.substr(0,str.length-1);
			$("#chufa_2").css("display","none");
			$("[name='chufa']").attr("checked",null);
			$(".buxian_chufa").attr("checked","checked");
			if(str!="on"&&str!=""){
				$("#yixuanze").css("display","block");
				$("#xuanze_chufa").css("display","block");
				$(".xuanze_chufa").html("&nbsp;"+str+"&nbsp;x&nbsp;");
			}else{
				$("#chufa").css("display","block");
			}
		})
		/*价格区间*/
		$("[name='jiage']").click(function(){
			$(".buxian_jiage").attr("checked",null);
		})
		$(".jiage_but").click(function(){
			var str="";
			$("#jiage_2 input:checked").each(function(){
				str=str+$(this).val()+",";
			})
			str=str.substr(0,str.length-1);
			$("#jiage_2").css("display","none");
			$("[name='jiage']").attr("checked",null);
			$(".buxian_jiage").attr("checked","checked");
			if(str!="on"&&str!=""){
				$("#yixuanze").css("display","block");
				$("#xuanze_jiage").css("display","block");
				$(".xuanze_jiage").html("&nbsp;"+str+"&nbsp;x&nbsp;");
			}else{
				$("#jiage").css("display","block");
			}
		})
		/*点击多选按钮*/
		$(".input").click(function(){
			$(this).parent().parent().css("display","none");
			$(this).parent().parent().next().css("display","block");
		})
		/*点击多选栏取消按钮*/
		$(".but_quxiao").click(function(){
			alert("2323232");
			$(this).parent().parent().parent().parent().parent().prev().css("display","block");
			$(this).parent().parent().parent().parent().parent().css("display","none");
			var did=$(this).parent().parent().parent().parent().parent().attr("id");	
			if(did=="difang_2"){
				$("[name='difang']").attr("checked",null);
				$(".buxian_difang").attr("checked","checked");
			}else if(did=="xingcheng_2"){
				$("[name='xingcheng']").attr("checked",null);
				$(".buxian_xingcheng").attr("checked","checked");
			}else if(did=="chufa_2"){
				$("[name='chufa']").attr("checked",null);
				$(".buxian_chufa").attr("checked","checked");
			}else if(did=="jiage_2"){
				$("[name='jiage']").attr("checked",null);
				$(".buxian_jiage").attr("checked","checked");
			}
		})
		/*鼠标滑过  已选择---DIV*/
		$(".xuanze_difang").live("mouseover",function(){
			$(this).css("background","#0099CC");
		})
		$(".xuanze_difang").live("mouseout",function(){
			$(this).css("background","#00CCFF");
		})
		/*点击X  已选择---DIV*/
		var a="";
		$(".xuanze_difang").live("click",function(){
			$(this).html(a);
			$("#xuanze_difang").css("display","none");
			$("#difang").css("display","block");
			if($(".xuanze_difang").html()==""&&$(".xuanze_xingcheng").html()==""&&$(".xuanze_chufa").html()==""&&$(".xuanze_jiage").html()==""){
				$("#yixuanze").css("display","none");
			}
		})
		$(".xuanze_xingcheng").live("click",function(){
			$(this).html(a);
			$("#xuanze_xingcheng").css("display","none");
			$("#xingcheng").css("display","block");
			if($(".xuanze_difang").html()==""&&$(".xuanze_xingcheng").html()==""&&$(".xuanze_chufa").html()==""&&$(".xuanze_jiage").html()==""){
				$("#yixuanze").css("display","none");
			}
		})
		$(".xuanze_chufa").live("click",function(){
			$(this).html(a);
			$("#xuanze_chufa").css("display","none");
			$("#chufa").css("display","block");
			if($(".xuanze_difang").html()==""&&$(".xuanze_xingcheng").html()==""&&$(".xuanze_chufa").html()==""&&$(".xuanze_jiage").html()==""){
				$("#yixuanze").css("display","none");
			}
		})
		$(".xuanze_jiage").live("click",function(){
			$(this).html(a);
			$("#xuanze_jiage").css("display","none");
			$("#jiage").css("display","block");
			if($(".xuanze_difang").html()==""&&$(".xuanze_xingcheng").html()==""&&$(".xuanze_chufa").html()==""&&$(".xuanze_jiage").html()==""){
				$("#yixuanze").css("display","none");
			}
		})
		/*点击全部清除*/
		$(".allremove").click(function(){
			$(".xuanze_difang").html(a);
			$(".xuanze_xingcheng").html(a);
			$(".xuanze_chufa").html(a);
			$(".xuanze_jiage").html(a);
			$("#xuanze_difang").css("display","none");
			$("#xuanze_xingcheng").css("display","none");
			$("#xuanze_chufa").css("display","none");
			$("#xuanze_jiage").css("display","none");
			$("#yixuanze").css("display","none");
			$("#difang").css("display","block");
			$("#xingcheng").css("display","block");
			$("#chufa").css("display","block");
			$("#jiage").css("display","block");
		})
		/*排序状态*/
		/*条件排序*/
		$("#paixu span").click(function(){
			$(this).parent().children().css("color","#000000");
			$(this).parent().children().attr("gg","0");
			$(this).css("color","#FF9933");
			$(this).attr("gg","1");
		})
		$("#paixu span").hover(function(){
			if($(this).attr("gg")!="1"){
				$(this).css("color","#FF9933");
			}
		},function(){
			if($(this).attr("gg")!="1"){
				$(this).css("color","#000000");
			}
		})
		/*列表和表格展示*/
		$(".img_1").click(function(){
			$(".img_1").attr("src","/pic/biao_2.PNG");
			$(".img_1").attr("aa","1");
			$(".img_2").attr("src","/pic/lie_1.PNG");
			$(".img_2").attr("aa","0");
			$("#ge").css("display","block");
			$("#lie").css("display","none");
		})
		$(".img_1").hover(function(){
			if($(".img_1").attr("aa")!="1"){
				$(".img_1").attr("src","/pic/biao_2.PNG");
			}
		},function(){
			if($(".img_1").attr("aa")!="1"){
				$(".img_1").attr("src","/pic/biao_1.PNG");
			}
		})
		$(".img_2").click(function(){
			$(".img_2").attr("src","/pic/lie_2.PNG");
			$(".img_2").attr("aa","1");
			$(".img_1").attr("src","/pic/biao_1.PNG");
			$(".img_1").attr("aa","0");
			$("#lie").css("display","block");
			$("#ge").css("display","none");
		})
		$(".img_2").hover(function(){
			if($(".img_2").attr("aa")!="1"){
				$(".img_2").attr("src","/pic/lie_2.PNG");
			}
		},function(){
			if($(".img_2").attr("aa")!="1"){
				$(".img_2").attr("src","/pic/lie_1.PNG");
			}
		})
		/*上下页鼠标移上状态*/
		$(".img_3").hover(function(){
			$(this).css("border","1px solid #cccccc");
		},
		function(){
			$(this).css("border","none");
		})
		$(".img_4").hover(function(){
			$(this).css("border","1px solid #cccccc");
		},
		function(){
			$(this).css("border","none");
		})
		/*鼠标移上列和表*/
		$(".huowu_1").live("mouseover",function(){
				$(this).css("border","1px solid #000000");				
		}).live("mouseout",function(){
				$(this).css("border","1px solid #CCCCCC")	
		})
		$(".huowu_2").live("mouseover",function(){
				$(this).css("border","1px solid #000000");				
		}).live("mouseout",function(){
				$(this).css("border","1px solid #CCCCCC")	
		})
	})